package com.erhirent.view;

import java.util.List;

import com.erhirent.bean.Record;

public class ManerqueryRecord extends View {

	@Override
	public View showView() {
		// 查看租车记录suoyou
		List<Record> list = mcar.manegerqueryRecord();
		if (list.size() != 0) {
			System.out.println("--------------------------------");
			System.out.println("出租编号\t" + "汽车编号\t" + "汽车名称\t" + "用户ID\t" + "用户昵称\t" + "单价\t" + "租车金额\t" + "备注\t"
					+ "品牌\t" + "类型\t" + "租车时间\t\t\t\t" + "还车时间");
			for (Record record : list) {
				System.out.print(record.getrentId() + "\t");
				System.out.print(record.getcarId() + "\t");
				System.out.print(record.getcarName() + "\t");
				System.out.print(record.getuserId() + "\t");
				System.out.print(record.getuserName() + "\t");
				System.out.print(record.getcarPrice() + "/天\t");
				System.out.print(record.getrentTotalPrice() + "\t");
				System.out.print(record.getcarRemark() + "\t");
				System.out.print(record.getbrandName() + "\t");
				System.out.print(record.gettypeName() + "\t");
				System.out.print(record.getrentTime() + "\t");
				System.out.println(record.getreturnTime() + "\t");

			}
			System.out.println("--------------------------------");
		} else {
			System.out.println("查询失败,返回主界面");
		}

		return null;
	}

}
